﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using ESOL.Common.Entity;

namespace ESOL.WinUI.Sales
{
    public partial class frmPrintFormSalesContract : BaseForm.frmBaseDialogyForm
    {
        #region Variable
        private SalesOrderEntity mSelectedSalesOrder;
        #endregion

        #region Constructor
        public frmPrintFormSalesContract()
        {
            InitializeComponent();
        }
        public frmPrintFormSalesContract(SalesOrderEntity entity)
        {
            InitializeComponent();
            mSelectedSalesOrder = entity;

        }
        #endregion

        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
            frmPrintTemplateSalesContract fXtraReport = new frmPrintTemplateSalesContract(mSelectedSalesOrder);
            printControl1.PrintingSystem = fXtraReport.PrintingSystem;
            fXtraReport.CreateDocument();
        }
    }
}